package com.bejoy.service.impl;

import com.bejoy.common.AjaxResult;
import com.bejoy.domain.dto.TUserDTO;
import com.bejoy.domain.model.User;
import com.bejoy.mapper.TUserMapper;
import com.bejoy.mapper.TUserRoleMapper;
import com.bejoy.service.TUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class TUserServiceImpl implements TUserService {

    @Autowired
    private TUserMapper tUserMapper;

    @Override
    public AjaxResult loginUser(TUserDTO tUserDTO) {

        List<User> userList = tUserMapper.loginUser(tUserDTO);

        if (userList.size() > 0) {
            return AjaxResult.success();
        }
        return AjaxResult.error();
    }
}
